<template>
	<div>
		<div class="item border-bottom" v-for='(item, index) in categoryList' :key='index'>
			<div class="item-title">
				<span class="item-title-icon"></span>
				{{item.title}}
			</div>
			<div v-if='item.children' class="item-children">
				<detailList :categoryList="item.children"></detailList>
			</div>
		</div>

	</div>
</template>

<script>
export default {
	name: 'detailList',
	props: {
		categoryList: Array
	}

}	
</script>

<style lang="stylus" scoped>
@import '~styles/varibles.styl'

	.item-title
		line-height: .8rem
		height: .8rem
		font-size: .32rem
		padding: 0 .2rem
		.item-title-icon
			display: inline-block
			width: .36rem
			height: .36rem
			position: relative
			top: .05rem
			background: $bgColor
			border-radius: .4rem
	.item-children
		padding-left: .4rem		

</style>